import fetch from '@/utils/fetch'

export function addNewStrategy(content,address) {
  return fetch({
    url: '/add/strategy',
    method: 'post',
     data: {
      content,
      address
    }
  })
}


export function addStrategyDetail(discovery_id,content) {
  return fetch({
    url: '/add/strategy/detail',
    method: 'post',
     data: {
      discovery_id,
      content
    }
  })
}


export function updateStrategy(content,address) {
  return fetch({
    url: '/update/strategy',
    method: 'post',
     data: {
      content,
      address
    }
  })
}

export function updateStrategyDetail(discovery_id,content) {

  return fetch({
    url: '/update/strategy/detail',
    method: 'post',
     data: {
      discovery_id,
      content
    }
  })
}




export function getStrategy(id,offset,keyword) {
  return fetch({
    url: '/get/strategy',
    method: 'get',
     params: {
     id,
     offset,
     keyword
    }
  })
}

export function getStrategyById(id) {

  return fetch({
    url: '/update/strategy',
    method: 'get',
     params: {
     id
    }
  })
}

export function deleteStrategy(id) {
  return fetch({
    url: '/delete/strategy',
    method: 'get',
     params: {
     id
    }
  })
}



   
